<?php
$this->breadcrumbs=array(
	'Quản lý tài khoản'=>array('/user/profile'),
	'Đổi mật khẩu',
);?>
<h1>Đổi mật khẩu</h1>

<?php if (user()->hasFlash('message')): ?>
	<?php echo user()->getFlash('message') ?>
<?php else: ?>
	<div class="form wide">

	<?php $form=$this->beginWidget('CActiveForm', array(
		'id'=>'user-changepasswordform-form',
		'enableAjaxValidation'=>false,
		'focus'=>array($model,'old_password'),
	)); ?>

		<div class="row">
			<?php echo $form->labelEx($model,'old_password'); ?>
			<?php echo $form->passwordField($model,'old_password'); ?>
			<?php echo $form->error($model,'old_password'); ?>
		</div>

		<div class="row">
			<?php echo $form->labelEx($model,'password'); ?>
			<?php echo $form->passwordField($model,'password'); ?>
			<?php echo $form->error($model,'password'); ?>
		</div>

		<div class="row">
			<?php echo $form->labelEx($model,'password_repeat'); ?>
			<?php echo $form->passwordField($model,'password_repeat'); ?>
			<?php echo $form->error($model,'password_repeat'); ?>
		</div>

		<div class="row buttons">
			<?php echo CHtml::submitButton('Thay mật khẩu mới', array('class'=>'g-button g-button-submit')); ?>
		</div>

	<?php $this->endWidget(); ?>

	</div><!-- form -->
<?php endif ?>

